home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / opengldoc / glspec / fog_func.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  5.0 KB  |  152 lines

  1. Name
  2.  
  3.     SGIS_fog_function
  4.  
  5. Name Strings
  6.  
  7.     GL_SGIS_fog_function
  8.  
  9. Version
  10.  
  11.     $Date: 1996/04/01 23:22:45 $ $Revision: 1.1 $
  12.  
  13. Number
  14.  
  15.     64    
  16.  
  17. Dependencies
  18.  
  19.     XXX
  20.  
  21. Overview
  22.  
  23.     This extension allows to define application-specific fog blend-factor
  24.     function.  Function is defined by the set of the "control" points and
  25.     should be monotonic. Each control point represented as a pair of the
  26.     eye-space distance value and corresponding value of the fog blending 
  27.     factor. The minimum number of control points is one. The maximum 
  28.     number is implementation dependent.
  29.     
  30.  
  31. New Procedures and Functions
  32.  
  33.     void FogFuncSGIS(sizei n,
  34.              const float* points);
  35.  
  36. New Tokens
  37.  
  38.     Accepted by the <param> parameter of Fogf and Fogi, and by the <params> 
  39.     parameter of Fogiv and Fogfv, when their <pname> parameter is FOG_MODE:
  40.  
  41.     FOG_FUNC_SGIS
  42.  
  43.     Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
  44.     GetIntegerv, and GetFloatv:
  45.  
  46.     FOG_FUNC_POINTS_SGIS
  47.     MAX_FOG_FUNC_POINTS_SGIS
  48.  
  49.     Accepted by the <pname> parameter of GetDoublev, and GetFloatv:
  50.  
  51.     FOG_FUNC_SGIS
  52.  
  53.     May be returned by GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv
  54.     when their <pname> parameter is FOG_MODE:
  55.  
  56.     FOG_FUNC_SGIS
  57.  
  58.  
  59. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  60.  
  61.     None
  62.  
  63. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  64.  
  65.  
  66.     3.9 Fog
  67.  
  68.     The function for computing blending factor may be specified by calling 
  69.     FogFuncSGIS with <points> pointing at an array of pairs of floating point 
  70.     values, and <n> set to the number of value pairs in <points>. The first 
  71.     value of each value pair in <points> specifies a value of eye-space 
  72.     distance (should be not negative), and the second value of each value pair 
  73.     specifies the corresponding value of the fog blend factor (should be in 
  74.     [0.0, 1.0] range). The order in which the points are specified is 
  75.     significant (if there is more then one point) based on the following 
  76.     requirements: 1. distance value of each point is not smaller then the 
  77.     distance value of its predecessor; 2. fog factor value of each point is 
  78.     not bigger then the fog factor value of its predecessor. The <n> value 
  79.     pairs in <points> completely specify the function, replacing any previous 
  80.     specification that may have existed. At least one control point should be 
  81.     specified. The maximum number of control points is implementation dependent
  82.     and may be inquired by Get commands. Initially fog function defined by a 
  83.     single point (0.0, 1.0).
  84.    
  85.     Fog factor function is evaluated by fitting a curve through the points
  86.     specified by FogFuncSGIS. This curve may be linear between adjacent points,
  87.     or it may be smoothed, but it will pass exactly through the points, limited
  88.     only by the resolution of the implementation. The value pair with the 
  89.     lowest distance value specifies the fog function value for all values of 
  90.     distance less than or equal to that pair's distance. Likewise, the value
  91.     pair with the greatest distance value specifies the function value for 
  92.     all values of distance greater than or equal to that pair's distance.
  93.  
  94.     If <pname> is FOG_MODE, and <param> is, or <params> point to an 
  95.     integer FOG_FUNC_SGIS then application specified fog factor function is
  96.     selected for the fog calculation. 
  97.  
  98.  
  99.  
  100. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  101. and the Framebuffer)
  102.  
  103.     None
  104.  
  105. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  106.  
  107.     None
  108.  
  109. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  110.  
  111.     The max allowed number of points in the fog factor function specification 
  112.     of a fog is queried by calling GetBooleanv, GetIntegerv, GetFloatv, 
  113.     and GetDoublev with <pname> set to MAX_FOG_FUNC_POINTS_SGIS.
  114.     The number of points in the current fog factor function is queried by 
  115.     calling GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev with <pname> 
  116.     set to FOG_FUNC_POINTS_SGIS.  All the points of the current fog factor 
  117.     function are queried by calling GetFloatv or GetDoublev with <pname> set 
  118.     to FOG_FUNC_SGIS. Points are returned in the same format as they are 
  119.     specified in the glFogFuncSGIS function.
  120.  
  121. Additions to the GLX Specification
  122.  
  123.     None
  124.  
  125. Errors
  126.  
  127.     INVALID_VALUE is generated if FogFuncSGIS parameter <n> is
  128.     negative.
  129.  
  130.     INVALID_VALUE is generated if fog factor value out of [0.0, 1.0]
  131.     range.
  132.  
  133.     INVALID_VALUE is generated if eye spce-distance is less then zero.
  134.  
  135.     INVALID_VALUE is generated if specified control points don't confirm
  136.     with order requirements.
  137.  
  138.     INVALID_OPERATION is generated if FogFuncSGIS is executed between 
  139.     execution of Begin and the corresponding execution to End.
  140.  
  141. New State
  142.  
  143.     Get Value            Get Command        Type        Initial Value    Attribute
  144.     ---------            -----------        ----        -------------    ---------
  145.     MAX_FOG_FUNC_POINTS_SGIS    GetIntegerv        Z+        XXX        fog
  146.     FOG_FUNC_POINTS_SGIS    GetIntegerv        Z+        1        fog
  147.     FOG_FUNC_SGIS        GetFloatv        2 x n x R+    (0.0, 1.0)    fog
  148.  
  149. New Implementation Dependent State
  150.  
  151.     None
  152.